<html>
<head>
  <title>楼盘管理——楼盘列表</title>
  <meta name="layout" content="common_header"/>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.form.min.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'jquery.metadata.pack.js', absolute: true)}"></script>
  <script type="text/javascript" src="${resource(dir: 'js/jquery', file: 'common.custom.js', absolute: true)}"></script>
  <script type="text/javascript">
    function approveEstate(id, flag) {
      jQuery("#id").val(id)
      jQuery("#flag").val(flag)
      jQuery("#submitForm").ajaxSubmit({
        success: function(response) {
          if (response == "1") {
            jQuery("#approveFlag_" + id).html(flag == "1" ? "通过" : "不通过")
          } else {
            alert("审批出错")
          }
        }
      });
    }
  </script>
</head>
<body>
<div id="man_zone">
  <form id="submitForm" name="submitForm" action="${createLink(controller: "admin", action: 'approveEstate', absolute: true)}" method="post">
    <input type="hidden" id="id" name="id"/>
    <input type="hidden" id="flag" name="flag"/>
  </form>
  <form id="queryForm" name="queryForm" action="${createLink(controller: "scaffold", action: 'list', absolute: true)}" method="post">
    <input type="hidden" name="property" value="${params?.property}"/>
    <table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td class="left_title_1">楼盘名称</td>
        <td class="fillin">
          <input type="text" id="zlk_name" name="zlk_name" value="${params?.zlk_name}">
        </td>
        <td class="left_title_1">审核状态</td>
        <td class="fillin">
          <input type="radio" name="aeq_approveFlag" value="" <g:if test="${params?.aeq_approveFlag==''||params?.aeq_approveFlag==null}">checked</g:if>/> 全部
          <input type="radio" name="aeq_approveFlag" value="0" <g:if test="${params?.aeq_approveFlag=='0'}">checked</g:if>/>未审核
          <input type="radio" name="aeq_approveFlag" value="1" <g:if test="${params?.aeq_approveFlag=='1'}">checked</g:if>/>通过
          <input type="radio" name="aeq_approveFlag" value="2" <g:if test="${params?.aeq_approveFlag=='2'}">checked</g:if>/>不通过
        </td>
      </tr>
      <tr>
        <td class="fillin" colspan="4" align="center"><input type="image" src="${resource(dir: '/images/admin_ui/', file: 'query1.gif', absolute: true)}" alt="查询"/></td>
      </tr>
    </table>
  </form>
  <br>

  <table cellpadding="0" cellspacing="0" width="95%" align="center" class="xtable">
    <thead>
    <tr>
      <td>图片名称</td>
      <td>操作</td>
      <td>图片类型</td>
      <td>描述</td>
      <td>略图</td>
    </tr>
    </thead>
    <tbody>
    <g:each in="${list.items}">
      <tr>
        <td>${it.fileName}</td>
        <td><g:if test="${it.okFlag == false}">未入库</g:if><g:elseif test="${it.okFlag == true}">入库</g:elseif></td>
        <td><g:if test="${it.type == 10}">楼盘图片</g:if><g:elseif test="${it.type == 20}">房型图片</g:elseif><g:elseif test="${it.type == 30}">室内图片</g:elseif></td>
        <td>${it.desc}</td>
        <td><img src="${resource(dir: '/upload/info_picture/', file: it.fileName, absolute: true)}" width="50" height="50"/></td>
      </tr>
    </g:each>
    </tbody>
    <tfoot>
    <tr>
      <td colspan="10" align="center">
        <g:paginate total="${list.count}" params="${params}"/>
      </td>
    </tr>
    </tfoot>
  </table>

</div>
</body>
</html>
